﻿@model IEnumerable<Citi.ReportManager.WebUi.Models.ReportFolderModel>
@{
    ViewBag.Title = "Report Folder";
}
<div id="divList">
    <h2>
        Report Folder</h2>
    <p>
        @Html.ActionLink("Create New", "Form")
    </p>
    <table class="table table-bordered table-striped">
        <tr>
            <th>
                Category
            </th>
            <th>
                Folder Path
            </th>
            <th>
                Include Directories?
            </th>
            <th>
                Days To Backup
            </th>
            <th>
                Can Convert To Xlsb?
            </th>
            <th>
                Separate In Folders?
            </th>
            <th>
                Move permanently?
            </th>
            <th>
            </th>
        </tr>
        @foreach (var item in Model)
        {
            <tr>
                <td>
                    @Html.DisplayFor(modelItem => item.CategoryId)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.FolderPath)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.IncludeDirectories)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.DaysToBackup)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.CanConvertToXlsb)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.SeparateInFolder)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.MoveFilePermanently)
                </td>
                <td>
                    @Html.ActionLink("Edit", "Form", new { id = item.Id }) | @*@Html.ActionLink("Delete", "Delete", new { id = item.Id })*@
                    @Ajax.ActionLink("Delete", "Delete", "ReportFolder", new { id = item.Id },
                    new AjaxOptions { UpdateTargetId = "divList", Confirm = "Are you sure?" }, null)
                </td>
            </tr>
        }
    </table>
</div>
